package com.letere.service.imp;

import com.letere.bean.User;
import com.letere.dao.UserMapper;
import com.letere.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author letere
 * @create 2021-02-04 17:08
 */
@Service
public class UserServiceImp implements UserService {

    @Autowired
    private UserMapper userMapper;

    /**
     * 获取用户信息
     * @param id 用户id
     * @return User 用户bean类
     */
    @Override
    public User getUserById(Integer id) {
        return userMapper.getUserById(id);
    }


    /**
     * 更新用户信息
     * @param user 用户bean类
     */
    @Override
    public void updateUser(User user) {
        userMapper.updateUser(user);
    }
}
